import Vue from 'vue'
import Router from 'vue-router'
import Recipe from "@/components/Recipe"
import Topic from "@/components/Topic"
import FocusOn from "@/components/FocusOn"
import My from "@/components/My"
import sho from "@/components/cai/sho"
import fenl from "@/components/cai/fenl"
import shi from "@/components/cai/shi"
import ping from "@/components/cai/ping"
import one from "@/components/ont/one"
import four from "@/components/Four"
import zhuan from '@/components/zhuan'
import zhuan_one from '@/components/zhuan/one'
import zhuan_two from '@/components/zhuan/two'
import zho_one from '@/components/cai/sho_cont/one'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: one,
      children: [
        {
          path: "",
          component: Recipe,
          linkActiveClass: "active",
          children: [
            {
              path: '',
              component: sho,
              children: [

              ]
            },
            {
              path: 'fenl',
              component: fenl
            }, {
              path: 'shi',
              component: shi
            }, {
              path: 'ping',
              component: ping
            },

          ]
        },
        {
          path: "/topic",
          component: Topic
        },
        {
          path: "/focusOn",
          component: FocusOn
        },
        {
          path: "/my",
          component: My
        }
      ]
    },
    {
      path: '*',
      component: four
    },
    {
      path: '/zhuan/:id?',
      component: zhuan,
      children: [
        {
          path: "",
          component: zhuan_one
        },
        {
          path: 'aa',
          component: zhuan_two
        }
      ]
    },
    {
      path: '/sho_one/:id?',
      component: zho_one
    }

  ]
})
